package com.bright.service.serviceimpl;

import com.bright.dao.UserDao;
import com.bright.pojo.User;
import com.bright.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User checkUser(String username, String password) {
        return userDao.findByUsernameAndPassword(username,password);
    }

    @Override
    public User getUserById(long id) {
        return userDao.getOne(id);
    }
}
